/*
 * gs_table.h
 */

#ifndef _GS_TABLEVIEW_H
#define _GS_TABLEVIEW_H
 
#ifdef __cplusplus
extern "C" {
#endif  /* __cplusplus */

#define GS_CTRL_TABLE            ("gs_ctrl_table")

typedef struct _GS_TABLEVIEW
{
    int nr_rows; //based 1
    int nr_cols; //based 1
    int col_width;
    int row_height;
}GS_TABLEVIEW;

typedef struct _GS_TABLECELL
{
    int row;
    int col;
}GS_TABLECELL;

#define GS_TBLM_BASE        (MSG_USER + 100)

/**
  * *** brief ***
  * An application send a GS_TBLM_SETHEADER message to set the
  * cell's content in the table control.
  *
  * *** code ***
  * int  index;
  * char* text;
  *
  * wParam = (WPARAM) index;
  * lParam = (LPARAM) text;
  *
  * *** return ***
  * Return TRUE is successful, or FALSE otherwize.
  */
#define GS_TBLM_SETHEADER   (GS_TBLM_BASE + 0)

/**
  * *** brief ***
  * An application send a GS_TBLM_SETCELL message to set the
  * cell's content in the table control.
  *
  * *** code ***
  * GS_TBLCELL* cell;
  * char* text;
  *
  * wParam = (WPARAM) cell;
  * lParam = (LPARAM) text;
  *
  * *** return ***
  * Return TRUE is successful, or FALSE otherwize.
  */
#define GS_TBLM_SETCELL     (GS_TBLM_BASE + 1)

/**
  * *** brief ***
  * An application send a GS_TBLM_SETCOLWIDTH message to set the
  * column width
  *
  * *** code ***
  * int index;
  * int width;
  *
  * wParam = (WPARAM) index;
  * lParam = (LPARAM) width;
  */
#define GS_TBLM_SETCOLWIDTH (GS_TBLM_BASE + 2)

/**
  * *** brief ***
  * An application send a GS_TBLM_SETROWHEIGHT message to set the
  * row height
  *
  * *** code ***
  * int index;
  * int height;
  *
  * wParam = (WPARAM) index;
  * lParam = (LPARAM) height;
  */
#define GS_TBLM_SETROWHEIGHT (GS_TBLM_BASE + 3)
   
BOOL RegisterGsTable (void);
void UnregisterGsTable (void);

#ifdef __cplusplus
}
#endif  /* __cplusplus */

#endif 

